package com.heima.sc.user.api;

import com.heima.sc.user.api.fallback.OrderApiFallback;
import com.itheima.sc.response.UserOrderDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

//远程调用 Feign
@FeignClient(value = "order-server",fallback = OrderApiFallback.class)
public interface OrderApi {

    @GetMapping("/order/findOrderDTO")
    public List<UserOrderDTO> findOrderDTO(@RequestParam("username")String username);
}
